package com.example.controller.zyz;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.example.pojo.DsdsAdjustMain;
import com.example.service.publi;
import com.example.service.zyz.DsdsAdjustMainBiz;
import com.example.vo.zyz.MessageVo;
import com.example.vo.zyz.pageBean;

@Controller
@RequestMapping("/DsdsAdjustMainAction")
public class DsdsAdjustMainAction {
	@Autowired
	private DsdsAdjustMainBiz biz;
	
	@Autowired
	private publi idbiz;
	
	
	//分页查询
	@RequestMapping("/queryAll")
	@ResponseBody
	public pageBean query(Integer pagenum){
		return biz.query(pagenum);
	}
	
	//主祥新增
	@RequestMapping(value="/addDsdsAdjustMain",method=RequestMethod.POST)
	@ResponseBody
	public MessageVo addDsdsAdjustMain(@RequestBody DsdsAdjustMain data){
		return biz.addDsdsAdjustMain(data);
	}
	
	//主祥修改
	@RequestMapping(value="/updateDsdsAdjustMain",method=RequestMethod.POST)
	@ResponseBody
	public MessageVo updateDsdsAdjustMain(@RequestBody DsdsAdjustMain data){
		return biz.updateDsdsAdjustMain(data);
	}
	
	//删除
	@RequestMapping("/delDsdsAdjustMainbyID")
	@ResponseBody
	public void delDsdsAdjustMainbyID(String id){
		biz.delDsdsAdjustMainById(id);
	}
	
	
	//获取id
	@RequestMapping("/getID")
	@ResponseBody
	public String getId(String date){
		return idbiz.danhao(date, "DsdsAdjustMain", "MoveNo");
	}
}
